package com.ttc.group2.videochat.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ttc.group2.videochat.R;
import com.ttc.group2.videochat.utils.ViewUtil;

public class TitleBar extends LinearLayout {
	public ImageView imgSatus;
	public TextView title;
	public LinearLayout llLayout;

	public TitleBar(Context context) {
		super(context);
		if (isInEditMode()) {
			return;
		}
		init();
	}

	public TitleBar(Context context, AttributeSet attrs) {
		super(context, attrs);
		if (isInEditMode()) {
			return;
		}
		init();
	}

	public TitleBar(Context context, AttributeSet attrs, int defStyleAttr) {
		super(context, attrs, defStyleAttr);
		if (isInEditMode()) {
			return;
		}
		init();
	}

	private void init() {
		llLayout = (LinearLayout) View.inflate(getContext(),
				R.layout.actionbar_title_view, this);
		imgSatus = (ImageView) ViewUtil.findViewById(llLayout, R.id.imgStatus);
		title = (TextView) ViewUtil.findViewById(llLayout, R.id.txtTitle);

		// check online/offline status

	}

}
